[Unit]
Description=OpenConnect client to Cisco AnyConnect and compatible VPN
Documentation=man:openconnect(8)
After=network.target

[Service]
Environment=IFACE=opcon
EnvironmentFile=/tmp/openconnect
Type=simple
ExecStartPre=/usr/bin/dos2unix /tmp/openconnect
ExecStart=/usr/sbin/openconnect -q --servercert=${FINGERPRINT} --resolve=${RESOLVE} --server=${CONNECT_URL} -C ${COOKIE} -i $IFACE -s /usr/local/bin/opcon-script.sh --csd-wrapper=/bin/true
Restart=no

[Install]
WantedBy=multi-user.target
